package com.cn.shiro_jwt_redis.controller;

import com.cn.shiro_jwt_redis.comm.model.ResultData;
import com.cn.shiro_jwt_redis.pojo.Login;
import com.cn.shiro_jwt_redis.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: 张坤鹏
 * @Date: 2021/08/04/10:22
 * @Description:
 */
@RestController
public class LoginController {

    @Autowired
    private LoginService loginService;

    @PostMapping("/login")
    public ResultData login(Login login, HttpServletResponse response){
        return loginService.login(login,response);
    }

}
